<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script src="http://webapi.amap.com/maps?v=1.3&key=88df6f9e49860a2d0c257cff57f0327f"></script>
<script src="https://cdn.wilddog.com/sdk/js/2.5.8/wilddog.js"></script>
<script src="https://cdn.wilddog.com/sdk/js/0.1.1/wilddog-location.js"></script>



<script type="text/javascript">
    var config = {
        syncURL: "https://shaliao.wilddogio.com" //输入AppID
    };
    wilddog.initializeApp(config);
    // 注意类名不要覆盖全局的变量，如：location 和 Location
    var wildLocation = wilddog.location();

    var locationProvider = wildLocation.initAMapLocationProviderWithTime(5000);
    wildLocation.startTracing(key, locationProvider);

    var cancelCallback = wildLocation.on(key, function(position) {
        console.log('最新位置的经纬度为： ', position.latitude(), ',' , position.longitude());
    });

</script>

</body>
</html>